<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout/base}">
<body>
<div layout:fragment="content">
    <div class="card shadow-sm">
        <div class="card-body">
            <h2 class="card-title mb-4">
                <i class="bi bi-pencil-square"></i> 发布新的文章
            </h2>
            <form th:action="@{/post/create}" method="post" th:object="${post}">
                <div class="mb-3">
                    <label for="title" class="form-label">标题</label>
                    <input type="text" class="form-control form-control-lg" 
                           id="title" th:field="*{title}" 
                           placeholder="请输入标题" required>
                </div>
                <div class="mb-3">
                    <label for="content" class="form-label">内容</label>
                    <textarea class="form-control" id="content" 
                              th:field="*{content}" rows="15" 
                              placeholder="支持markdown语言形式" required></textarea>
                    <div class="form-text">Markdown syntax is supported for rich content</div>
                </div>
                <div class="text-end">
                    <a href="/" class="btn btn-light me-2">取消发布</a>
                    <button type="submit" class="btn btn-primary">
                        <i class="bi bi-send"></i> 发布
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html> 